home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / sporder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  2.1 KB  |  86 lines

  1. #pragma option push -b
  2. /*++
  3.  
  4. Copyright (c) 1996  Microsoft Corporation
  5.  
  6. Module Name:
  7.  
  8.     sporder.h
  9.  
  10. Abstract:
  11.  
  12.     This header prototypes the 32-Bit Windows functions that are used
  13.     to change the order or WinSock2 transport service providers and
  14.     name space providers.
  15.  
  16. Revision History:
  17.  
  18. --*/
  19.  
  20. /*
  21.  *      C/C++ Run Time Library - Version 9.0
  22.  *
  23.  *      Copyright (c) 1997, 1998 by Borland International
  24.  *      All Rights Reserved.
  25.  *
  26.  */
  27.  
  28.  
  29.  
  30. int
  31. WSPAPI
  32. WSCWriteProviderOrder (
  33.     IN LPDWORD lpwdCatalogEntryId,
  34.     IN DWORD dwNumberOfEntries
  35.     );
  36. /*++
  37.  
  38. Routine Description:
  39.  
  40.     Reorder existing WinSock2 service providers.  The order of the service
  41.     providers determines their priority in being selected for use.  The
  42.     sporder.exe tool will show you the installed provider and their ordering,
  43.     Alternately, WSAEnumProtocols(), in conjunction with this function,
  44.     will allow you to write your own tool.
  45.  
  46. Arguments:
  47.  
  48.     lpwdCatalogEntryId  [in]
  49.       An array of CatalogEntryId elements as found in the WSAPROTOCOL_INFO
  50.       structure.  The order of the CatalogEntryId elements is the new
  51.       priority ordering for the service providers.
  52.  
  53.     dwNumberOfEntries  [in]
  54.       The number of elements in the lpwdCatalogEntryId array.
  55.  
  56.  
  57. Return Value:
  58.  
  59.     ERROR_SUCCESS   - the service providers have been reordered.
  60.     WSAEINVAL       - input parameters were bad, no action was taken.
  61.     ERROR_BUSY      - the routine is being called by another thread or process.
  62.     any registry error code
  63.  
  64.  
  65. Comments:
  66.  
  67.     Here are scenarios in which the WSCWriteProviderOrder function may fail:
  68.  
  69.       The dwNumberOfEntries is not equal to the number of registered service
  70.       providers.
  71.  
  72.       The lpwdCatalogEntryId contains an invalid catalog ID.
  73.  
  74.       The lpwdCatalogEntryId does not contain all valid catalog IDs exactly
  75.       1 time.
  76.  
  77.       The routine is not able to access the registry for some reason
  78.       (e.g. inadequate user persmissions)
  79.  
  80.       Another process (or thread) is currently calling the routine.
  81.  
  82. --*/
  83.  
  84.  
  85. #pragma option pop
  86.